<template>
	<view>
		<!-- 搜索无结果 text="没有搜索到相关内容,换个词试试" -->
		<view class="searchEmpty">
			<view>
				<u-image :src="src" width="300rpx" height="300rpx" bg-color="none">
					<view slot="loading" 
						  class="u-flex u-row-center u-col-center emptyLoading"
						  style="">
						<view>
							<u-loading></u-loading>
						</view>
					</view>
					<view slot="error">
						<u-empty :mode="mode" text=" "></u-empty>
					</view>
				</u-image>
			</view>
			<view  v-if="textArr.length>0"  
					style="text-align: center;color: #c8c9cc;font-size: 26rpx;">
				<view class="u-p-4" v-for="(text,index) in textArr" :key="index">
					{{text}}
				</view>
			</view>
		</view> 
	</view>
</template>

<script>
	export default {
		name:"empty",
		props:{
			textArr:{
				type:Array,
				default:[]
			},
			mode:{
				type:String,
				default:"data"
			},
			src:{
				type:String,
				default:'',
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss" scoped>
	.searchEmpty{
		min-height: 400rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		justify-items: center;
		align-items: center;
		align-content: center;
	}
	.emptyLoading{
		width: 300rpx;
		height: 300rpx;
		background-color:$main-color;
	}
</style>
